<div id="templatemo_content_right">
  <div style="float:left;width:700px;height:445px;" >
  <div class="templatemo_product_box" style="float:left;width:600px;height:445px;">
            	<h1>New  <span> Purchase</span></h1>
            	
                
				
				
				<!-- php -->



<?php

//check if data is set 
 if  (!isset($_POST["category_id"]) || !isset($_POST["new_product_name"])    || 
     !isset($_POST["quantity"])       || !isset($_POST["purchase_price"])||
	 !isset($_POST["sell_price"])     || !isset($_POST["total_purchase_price"])||
	 !isset($_POST["image_src"])      || !isset($_POST["description"])         ||
	 !isset($_POST["dop"])            || !isset($_POST["supplier"])             ){
	
	
	echo 'Please Fill in all Fields !<br/>
	                     <a href="cp.php">Back To CP</a>
' ; 
}
	else {
	
	
$category_id=$_POST['category_id'];
$new_product_name=$_POST['new_product_name'];
$quantity=$_POST['quantity'];
$purchase_price=$_POST['purchase_price']; 
$sell_price=$_POST['sell_price'];
$total_purchase_price=$_POST['total_purchase_price'];
$image_src=$_POST['image_src'];
$description=$_POST['description'];
$dop=$_POST['dop'];
$supplier=$_POST['supplier'];






//create object of admin 
// call the fn to add 
require_once('Admin.php');

$admin= new Admin;

$admin->Add_NewProduct_Purchase(
$category_id,
$new_product_name,
$quantity,
$purchase_price, 
$sell_price,
$total_purchase_price,
$image_src,
$description,
$dop,
$supplier
);

}   
?>
	
				<!-- php end  -->
				
</div>
                      </div>
    
            
            <div class="cleaner_with_height">&nbsp;</div>
           <!-- code for advertising image  -->           
		  
			
			
        </div> <!-- end of content right -->
		
		